<?php

require_once ('../core.php');
require_once ('../Models/ClassUtilisateur.php');

$oInfoUser = ClassUtilisateur::Logon($_POST['login'], $_POST['password']);
if (isset($oInfoUser) && !empty($oInfoUser)) {
    
    $_SESSION['user_id'] = $oInfoUser->ID;
    
    header("location:timeline.php"); 
} else {
    header("location:../index.php"); 
}
?>